def run(params:list[str]):
    from ApiTools import apiTools,apiBase
    try:
        jsn_grp='''{
	"edges":[{"from":"__start__","to":"echoA"},
		{"from":"agentA","to":"agentB"},
		{"from":"agentA","to":"agentC"},
		{"from":["agentB","agentC"],"to":"agentD"},
		{"from":"agentE","to":"__end__"}
		],
	"conditional_edges":[
	  {"from":"agentD",
	   "should_continue": "should_continue.py",
	   "next":{
			"continue": "agentE",
			"end": "__end__"
		  }
    }
  ]
}'''
        tools=apiBase.argv_array(params,1,'sql-convert/tools;',';')
        agent_name=apiBase.argv(params,2,"sql-convert")
        edges=apiBase.argv_json(params,3,jsn_grp)
        
        grp = apiTools.load_tol()
        agent=grp.load_json(tools,edges)        
        return apiBase.agent_reg(agent_name,agent)
    except Exception as e:
        return f"function error:{e}"

#准备测试例子
#run([])